
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />

	<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
	<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>广告审核界面</title>
</head>
<body>
	<div class="pd-20">
		<form method="post" class="form form-horizontal" id="dataform">
			<input type="hidden" name="advertid" value='${advertid}' />

			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">操作：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<select name="status" class="select" onchange="changestatus(this.value)">
						<option value="1">同意</option>
						<option value="3">驳回</option>
					</select>
				</div>
			</div>
			<div class="row cl" id="reasondiv" style="display: none;">
				<label class="form-label col-xs-4 col-sm-3">驳回原因：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<textarea id="reason" name="reason" class="form-control" required="" aria-required="true" style="margin: 0px -0.015625px 0px 0px; height: 97px; width: 290px;"></textarea>
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
					<button onClick="checkadvert()" class="btn btn-primary radius" type="button">
						<i class="Hui-iconfont">&#xe632;</i> 提交
					</button>

				</div>	
			</form>
		</div>

		<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
		<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
		<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
		<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
		<script type="text/javascript">
			function changestatus(value){
				if(value==1){
					$("#reasondiv").hide();
					$("#reason").html("");
				}else{
					$("#reasondiv").show();
				}
			}

			function checkadvert(){
				$.ajax({
					type:"post",
					url:"<%=path%>/backstage/updateadvertstatus",
					data:$("#dataform").serialize(),
					success:function(msg){
						var info = eval('('+msg+')');
						if(info.error == "0000"){
							parent.location.reload();
							var index = parent.layer.getFrameIndex(window.name);
							parent.layer.close(index);
						}else{
							alert(info.information);
						}

					}
				})
			}
		</script>
	</body>
	</html>